<template>
	<view class="repair-wrap">
		<view class="u-m-t-20 repair-box u-p-20 u-p-l-20 u-p-r-20">
			<view>
				<view class="flex flex-row-reverse">
					<span class="pr-2 pl-2  bg-hover-success text-white d-inline-block" 
					style="border-top-left-radius: 20rpx;border-bottom-right-radius: 20rpx;padding: 10rpx 20rpx;text-align: center;">
						{{userObj.states}}
					</span>
				</view>
				<h3 style="text-align: center;margin-bottom: 10rpx;">{{userObj.regulations_name}}</h3>
			</view>
			<view class="bg-white rounded-1 shadow p-3 mt-3">
			<view >
				<view style="color: #999999;width:160rpx">适用岗位：</view>
				<view class="">{{userObj.org_name}}-{{userObj.project_name}}-{{userObj.post_id?userObj.dept_name+'-'+userObj.post_name+'该岗位下所有人员':
                  userObj.dept_id?userObj.dept_name+'该部门下所有人员':
                  userObj.project_id?userObj.project_name+'该项目下所有人员':
                  userObj.org_name+'该公司下所有人员'}}</view>
			</view>
		
			
			<view style="margin-top: 10px;">
				<view style="color: #999999;">发布人：</view>
				<view class="text-list">{{userObj.user_dept_name}}-{{userObj.user_post_name}}-{{userObj.user_name}}</view>
			</view>
			<view style="margin-top: 10px;">
				<view style="color: #999999;">发布时间：</view>
				<view class="text-list">{{userObj.begin_time}}</view>
			</view>
			</view>
			<view style="margin-top: 20px;" class="pr-4 pl-4">
				<!-- <view style="color: #666666;">制度备注</view> -->
				<!-- <view style="margin-top: 5px;text-indent: 2em;"> -->
				<!-- <view style="color:#666">内容：</view> -->
					<rich-text style="line-height: 40rpx;" :nodes="userObj.regulations_remarks"></rich-text>
				<!-- </view> -->
				 
				<!-- <view style="color: #666666;margin-top: 5px" v-html="userObj.rules_regulations_remarks"></view> -->
			</view>
			<view style="margin-top: 10px;"  class="flex flex-row-reverse">
				<view >{{userObj.regulations_time}}</view>
				<view style="color: #999999;">失效时间：</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userObj:{},
				id:null,
			}
		},
		onShow() {
			// this.getRepaireClass()
		},
		onLoad(options) {
			const item = JSON.parse(decodeURIComponent(options.item));
			this.userObj = item
			console.log(this.userObj)
		},
		methods: {
			
			
		}
	}
</script>

<style lang="scss">
	.repair-wrap {
		width: 100%;
		// min-height: 100vh;
		height: auto;
		background: #f4f4f4;
		overflow: hidden;

		.repair-box {
			background: #fff;

			.repair-titel {
				height: 44rpx;
				line-height: 44rpx;

				.repair-titel-l {
					float: left;
				}

				.repair-titel-r {
					float: right;
					color: #999;
				}
			}

			.repair-6 {
				color: #666;
			}
		}
	}
	.text-list{
		float: right;
		margin-top: -10px;
		margin-top: -20px;
	}
</style>
